/**
* Author: 	XU Songgang
* Email:	sxu@ust.hk
*/
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include "testsuite/global.h"
#include "Matrix.h"
#include "Pixel.h"
#include "PPM.h"
#include "testsuite/Matrix_test.hpp"
#include "testsuite/Pixel_test.hpp"
#include "testsuite/PPM_test.hpp"
using namespace std;



int main()
{
        TEST_SUITE_BEGIN("TEST SUITE");

        TEST(Matrix_construction(), 		"Matrix_construction");             
        TEST(Matrix_subscript_operator(),	"Matrix_subscript_operator");             
        TEST(Matrix_plus_operator(),		"Matrix_plus_operator");             
        TEST(Matrix_minus_operator(),		"Matrix_minus_operator");          	
        TEST(Matrix_scale_product(),		"Matrix_scale_product");           	
        TEST(Matrix_matrix_product(),		"Matrix_matrix_product");          	
        TEST(Matrix_divide_operator(),		"Matrix_divide_operator");         	
        TEST(Matrix_stream(),			"Matrix_stream");              
        TEST(Matrix_getrowsize(),		"Matrix_getrowsize");              
        TEST(Matrix_getcolsize(),		"Matrix_getcolsize");              


        TEST(Pixel_construction(),		"Pixel_construction");              
        TEST(Pixel_assignment_operator(),	"Pixel_assignment_operator");            
        TEST(Pixel_plus_operator(),		"Pixel_plus_operator");              
        TEST(Pixel_minus_operator(),		"Pixel_minus_operator");              
        TEST(Pixel_divide_operator(),		"Pixel_divide_operator");              
        TEST(Pixel_vector_product_operator(),	"Pixel_vector_product_operator"); 	         
        TEST(Pixel_scale_product_operator(),	"Pixel_scale_product_operator"); 	        
        TEST(Pixel_stream (),			"Pixel_stream");                          


        TEST(PPM_load_save(),			"PPM_load_save");                  
        TEST(PPM_invert(),			"PPM_invert");                  
        TEST(PPM_enlarge_snail_2(),		"PPM_enlarge_snail_2");            
        TEST(PPM_enlarge_logo_2(),		"PPM_enlarge_logo_2");             
        TEST(PPM_enlarge_boxes_3(),		"PPM_enlarge_boxes_3");            	

        TEST_SUITE_END();

	return 0;
}
/*
int main(void) {
	// test matrix operation
	Matrix<float> m(10, 10);
	for(int i = 0; i < m.getRowSize(); ++i) {
		for(int j = 0; j < m.getColSize(); ++j) {
			m(i, j) = 1;
		}
	}

	cout << m.getRowSize() << " " << m.getColSize() << endl;
	cout << "------------------------------"<<endl;
	cout << m;
	cout << "------------m * 2-------------"<<endl;
	cout << m * 2 ;	
	cout << "------------m + m-------------"<<endl;
	cout << m + m;
	cout << "------------m * m-------------"<<endl;
	cout << m * m;
	cout << "------------m / 2----------------"<<endl;
	cout << m / 2;

	//cout <<"Change the value of (2,3) to be 2"<<endl;

	
	// test image operation
	PPM image;
	image.load("snail_original.ppm");
	
	image.invert();
	image.save("inverted.ppm");

	image.enlarge(2);
	image.save("enlarged.ppm");
	return 0;
}
*/

